<?php
/* @var $model Ad */
/* @var $this AdController */
?>
<?php
$this->breadcrumbs = array(
    'Advertising' => array('index'),
    'Update ad',
);
?>
<div class="box">
    <header>
        <h5>Update an ad</h5>
    </header>
    <div class="body">
	<?php
	if ($model instanceof Equipment) {
	    $this->renderPartial('register/equipment', array('model' => $model, 'aAdditionCats' => $aAdditionCats, 'update' => 1));
	} elseif ($model instanceof Supply) {
	    $this->renderPartial('register/supply', array('model' => $model, 'aAdditionCats' => $aAdditionCats, 'update' => 1));
	} elseif ($model instanceof Resume) {
	    $this->renderPartial('register/resume', array('model' => $model, 'aAdditionCats' => $aAdditionCats, 'update' => 1));
	} elseif ($model instanceof Job) {
	    $this->renderPartial('register/job', array('model' => $model, 'aAdditionCats' => $aAdditionCats, 'update' => 1));
	} elseif ($model instanceof Vendor) {

	    if (!$model->eBlast) {
		$model->eBlast = new Eblast();
	    }
	    //$this->renderPartial('register/company_source', array('model' => $model, 'eblast' => $params['eblast']));
	    $this->renderPartial('register/vendor', array('model' => $model, 'eblast' => $model->eBlast, 'aAdditionCats' => $aAdditionCats, 'update' => 1));
	} elseif ($model instanceof Technical) {
	    if (!$model->eBlast) {
		$model->eBlast = new Eblast();
	    }
	    $this->renderPartial('register/technical', array('model' => $model, 'eblast' => $model->eBlast, 'aAdditionCats' => $aAdditionCats, 'update' => 1));
	}
	?>
    </div>
</div>